package com.mc.music_web.services.impl;

import com.mc.music_web.entity.Ticket;
import com.mc.music_web.mapper.TicketMapper;
import com.mc.music_web.services.TicketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class TicketServiceImpl implements TicketService{
    @Autowired
    private TicketMapper ticketMapper;

    public List<Ticket> sellectTicket() {
        return ticketMapper.sellectTicket();
    }

    public int delterTicket(Integer ticketId) {
        return ticketMapper.delterTicket(ticketId);
    }

    public List<Ticket> selectByChooseTicket(String keyword) {
        return ticketMapper.selectByChooseTicket(keyword);
    }

    public int insertTicket(Ticket ticket) {
        return ticketMapper.insertTicket(ticket);
    }

    public int updateTicket(Ticket ticket) {
        return ticketMapper.updateTicket(ticket);
    }
}
